Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
expo-constants
Advanced tools
Provides system information that remains constant throughout the lifetime of your app.
The expo-constants package provides system information that is useful for building and debugging React Native applications. It includes constants such as the app's manifest, device information, and platform-specific details.
App Constants
This feature allows you to access the app's manifest, which includes information such as the app's name, version, and other metadata.
const Constants = require('expo-constants');
console.log(Constants.manifest);
Device Information
This feature provides information about the device, such as the device name, which can be useful for debugging and analytics.
const Constants = require('expo-constants');
console.log(Constants.deviceName);
Platform-specific Constants
This feature gives you access to platform-specific constants, such as the operating system and its version, which can help in writing platform-specific code.
const Constants = require('expo-constants');
console.log(Constants.platform);
The react-native-device-info package provides device information such as device ID, system name, and system version. It is similar to expo-constants but offers more detailed device-specific information.
The expo-device package offers detailed information about the device, including device model, manufacturer, and total memory. It is more focused on device-specific details compared to expo-constants.
The react-native-config package allows you to manage environment-specific configurations. While it doesn't provide system information like expo-constants, it is useful for managing different configurations for different environments.
Provides system information that remains constant throughout the lifetime of your app.
This package is pre-installed in managed Expo projects. You may skip the rest of the installation guide if this applies to you.
For bare React Native projects, you must ensure that you have installed and configured the react-native-unimodules
package before continuing.
Contributions are very welcome! Please refer to guidelines described in the contributing guide.
FAQs
Provides system information that remains constant throughout the lifetime of your app.
The npm package expo-constants receives a total of 554,589 weekly downloads. As such, expo-constants popularity was classified as popular.
We found that expo-constants demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 33 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.